package com.cos.entity;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.util.*;

/**
 * @author: COS
 * @time: 2021/11/11 11:15
 * @description:
 */
public class Student {
    private int sno;
    private String sname;
    private String sex;
    private int[] scores;
    private Set<String> hobby;
    private List<String> subjects;
    private Map<String,String> connect;
//    private Properties pro;
    private Address add ;

    public Address getAdd() {
        return add;
    }

    public void setAdd(Address add) {
        this.add = add;
    }

//    public Properties getPro() {
//        return pro;
//    }
//
//    public void setPro(Properties pro) {
//        this.pro = pro;
//    }

    @Override
    public String toString() {
        return "Student{" +
                "sno=" + sno +
                ", sname='" + sname + '\'' +
                ", sex='" + sex + '\'' +
                ", scores=" + Arrays.toString(scores) +
                ", hobby=" + hobby +
                ", subjects=" + subjects +
                ", connect=" + connect +
//                ", pro=" + pro +
                ", add=" + add +
                '}';
    }

    public int getSno() {
        return sno;
    }

    public void setSno(int sno) {
        this.sno = sno;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int[] getScores() {
        return scores;
    }

    public void setScores(int[] scores) {
        this.scores = scores;
    }

    public Set<String> getHobby() {
        return hobby;
    }

    public void setHobby(Set<String> hobby) {
        this.hobby = hobby;
    }

    public List<String> getSubjects() {
        return subjects;
    }

    public void setSubjects(List<String> subjects) {
        this.subjects = subjects;
    }

    public Map<String, String> getConnect() {
        return connect;
    }

    public void setConnect(Map<String, String> connect) {
        this.connect = connect;
    }

    public Student() {
        System.out.println("耶~~~~~");
    }

    @PostConstruct
    public void init(){
        System.out.println("被创建了");
    }
    @PreDestroy
    public void destroy(){
        System.out.println("被销毁了");
    }

}
